<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="./../template/WorkspaceTemplate.xhtml">

    <ui:define name="top">
        
    </ui:define>

    <ui:define name="left">
    </ui:define>

    <ui:define name="right">

    </ui:define>

    <ui:define name="content">
        <h:form>
            <p:panel id="panel" header="View All Member Discount Group">
                <br/>
                <p:dataTable  styleClass="allaroundborder" value="#{mdgManagerBean.viewAllMemberDiscount()}" var="mdg"
                              paginator="true" rows="10">

                    <f:facet name="header">  
                        List of Member Discount Group
                    </f:facet>
                    
                    <p:column sortBy="#{mdg.group}" filterBy="#{mdg.group}">
                        <f:facet name="header">
                            <h:outputText value="Discount Group" />
                        </f:facet>
                        <h:outputText value="#{mdg.group}" />
                    </p:column>
                    
                    <p:column sortBy="#{mdg.accSpendingForWs}" filterBy="#{mdg.accSpendingForWs}">
                        <f:facet name="header">
                            <h:outputText value="Acc. Spending (WS)" />
                        </f:facet>
                        <h:outputText value="#{mdg.accSpendingForWs}" />
                    </p:column>
                    
                    <p:column sortBy="#{mdg.accSpendingForDs}" filterBy="#{mdg.accSpendingForDs}">
                        <f:facet name="header">
                            <h:outputText value="Acc. Spending (DS)" />
                        </f:facet>
                        <h:outputText value="#{mdg.accSpendingForDs}" />
                    </p:column>
                    
                    <p:column sortBy="#{mdg.memberDiscount}" filterBy="#{mdg.memberDiscount}">
                        <f:facet name="header">
                            <h:outputText value="Discount" />
                        </f:facet>
                        <h:outputText value="#{mdg.memberDiscount}" />
                    </p:column>
                </p:dataTable>
            </p:panel>
        </h:form>
    </ui:define>

    <ui:define name="bottom">
       
    </ui:define>

</ui:composition>
